import router from "./router";
import store from "./store";
const whiltList = ['/login','/404']
router.beforeEach((to, from, next) => {
  if(store.getters.token) {
    next()
  }else {
    if(whiltList.includes(to.path)) {
      next()    
    }else {
      next('/login')
    }
  }
})